using System.Web.Security;

namespace MembershipAdapter
{
    public interface IUserRepository
    {
        bool ChangePassword(string username, string oldPassword, string newPassword);

        bool ChangePasswordQuestionAndAnswer(string username, string password, string newPasswordQuestion, string newPasswordAnswer);

        void CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved);

        void DeleteUser(string username);

        bool FindUser(string username, string password = null);

        MembershipUserCollection FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords);

        MembershipUserCollection FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords);

        MembershipUserCollection GetAllUsers(int pageIndex, int pageSize, out int totalRecords);

        MembershipUser GetMembershipUser(object providerUserKey, bool userIsOnline);

        MembershipUser GetMembershipUser(string username, bool userIsOnline);

        int GetNumberOfUsersOnline();

        string GetPassword(string username, string answer);

        string GetUserNameByEmail(string email);

        string ResetPassword(string username, string answer);

        bool UnlockUser(string userName);

        void UpdateUser(MembershipUser user);

        bool ValidateUser(string username, string password);

        MembershipProviderSettings Settings { get; }
    }
}